import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
const app = createApp(App);

// element-plus
import ElementPlus from "element-plus"; // 全局引入 elementPlus
import "element-plus/dist/index.css"; // 全局 elementPlus 样式
import locale from "element-plus/dist/locale/zh-cn"; // 中文
import * as ElementPlusIcons from "@element-plus/icons-vue"; // 图标

for (const [key, component] of Object.entries(ElementPlusIcons)) {
  app.component(key, component);
}

import slideIn from "./directive/slideIn.js";

// 路由
import router from "./router/index.js";

app
  .use(router)
  .directive("silde-in", slideIn)
  .use(ElementPlus, { locale })
  .mount("#app");
